Skip to main content

iCal

The iCal template data source can be used to show data from an ical-formatted data file. Data is updated every 10 minutes.

Requirements

  • A Smartsign iCal template data source license
  • An iCal formatted data file available on a public URL without authentication. The iCal-file is fetched by Smartsign Cloud.
  • Screens must be able to reach https://bookingapi.smartsigncloud.com

iCal data source configuration

Setting

Description

Example

iCal link

Public address in iCal format

https://calendar.com/calendar/ical/calendarid/public/basic.ics

Locations

Filter the calendar events by locationPress Load to load available locations from the iCal link.

Room 2

Filter events by time

Filter the calendar events by time

Today

Show expired events

Determines if bookings continue showing after they have ended

Disabled

Data transformation script

Careful! Programming knowledge required.

It's possible to transform/manipulate the data before showing it by providing a script here.

The iCal data is available in the variable "input"

Moment.js is available to work with date/time.

The function must return the data when the transformation is completed.

function(input, moment) {

            for(var i=0; i < input.bookings.length; i++) {

                        if(input.bookings[i].name && input.bookings[i].name.indexOf('(all day)') >= 0) {

                                    input.bookings[i].name = input.bookings[i].name.replace('(all day)','');

                                    input.bookings[i].datestart = moment(input.bookings[i].datestart).startOf('day');

                                    input.bookings[i].dateend = moment(input.bookings[i].dateend).endOf('day');

                        }

            }

            return input;

}